using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Threading;
using System.Globalization;
using ETO;
using BSO;
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Lang"] == null)
            Session["Lang"] = "en-US";
        Language.language = Session["Lang"].ToString();
        ConfigBSO configBSO = new ConfigBSO();
        Config config = configBSO.GetAllConfig(Language.language);
        Page.Title = config.Titleweb;
        switch (Request.QueryString.Get("go"))
            {

                case "catenews":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/CateNews.ascx"));
                    break;
                case "company":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/CateCompany.ascx"));
                    break;
                case "list":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/CateProduct.ascx"));
                    break;
                case "pages":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/Pages.ascx"));
                    break;
                case "faq":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/Faq.ascx"));
                    break;
                case "fullnews":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/FullNews.ascx"));
                    break;
                case "fullproduct":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/FullProduct.ascx"));
                    break;
                case "product":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/Product.ascx"));
                    break;
                case "news":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/News.ascx"));
                    break;
                case "detailpage":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/DetailPage.ascx"));
                    break;
                case "search":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/Search.ascx"));
                    break;
                case "contact":
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/Contact.ascx"));
                    break;
                default:
                    PlaceHolderNavi.Controls.Add(LoadControl("Client/Main.ascx"));
                    break;

            }
        }
    protected override void InitializeCulture()
    {
        string lang = (Session["Lang"] != null) ? Session["Lang"].ToString() : "en-US";
        if (lang != null && lang != "")
        {
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(lang);
            Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(lang);
        }
    }
}
